﻿using System.IO;
using NUnit.Framework;
using Smartkernel;
using Smartkernel.Log;

namespace Smartkernel.NUnitTest.Log
{
    [Category("Log")]
    [TestFixture]
    public class SmartTxtLogerTest
    {
        [Test]
        public void Test()
        {
            //【01】写入日志（涉及方法：Write）
            string path = @"C:\LogFolder\log.log";
            SmartTxtLoger.Write("发生了异常！", path);
            SmartTxtLoger.Write("发生了异常！", path, SmartLogLevelType.Terribly);
            Assert.AreEqual(File.Exists(path), true);
            File.Delete(path);
            Directory.Delete(@"C:\LogFolder");
        }
    }
}
